package cn.wgx.modules.sys.entity;

import java.util.ArrayList;
import java.util.List;

public class SysChinaCityExample {

    /**
     * @mbg.generated Tue May 28 17:18:16 CST 2019
     */
    public SysChinaCityExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    /**
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    protected String orderByClause;

    /**
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    protected List<Criteria> oredCriteria;

    /**
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    protected boolean distinct;

    /**
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    /**
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    /**
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    /**
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    /**
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    public boolean isDistinct() {
        return distinct;
    }

    /**
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    public String getOrderByClause() {
        return orderByClause;
    }

    /**
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    /**
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    /**
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    /**
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    /**
     * @mbg.generated do_not_delete_during_merge Tue May 28 17:18:18 CST 2019
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    /**
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    protected abstract static class GeneratedCriteria {

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        protected List<Criterion> criteria;

        public Criteria andCity_idIsNotNull() {
            addCriterion("t.city_id is not null");
            return (Criteria) this;
        }

        public Criteria andCity_idLessThan(Integer value) {
            addCriterion("t.city_id <", value, "city_id");
            return (Criteria) this;
        }

        public Criteria andCityNameIsNotNull() {
            addCriterion("t.cityName is not null");
            return (Criteria) this;
        }

        public Criteria andParentidEqualTo(Integer value) {
            addCriterion("t.parentid =", value, "parentid");
            return (Criteria) this;
        }

        public Criteria andCodeidIsNotNull() {
            addCriterion("t.codeid is not null");
            return (Criteria) this;
        }

        public Criteria andParentidIn(List<Integer> values) {
            addCriterion("t.parentid in", values, "parentid");
            return (Criteria) this;
        }

        public Criteria andCityNameNotBetween(String value1, String value2) {
            addCriterion("t.cityName not between", value1, value2, "cityName");
            return (Criteria) this;
        }

        public Criteria andCityNameIn(List<String> values) {
            addCriterion("t.cityName in", values, "cityName");
            return (Criteria) this;
        }

        public Criteria andCodeidBetween(Integer value1, Integer value2) {
            addCriterion("t.codeid between", value1, value2, "codeid");
            return (Criteria) this;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        public Criteria andCity_idNotEqualTo(Integer value) {
            addCriterion("t.city_id <>", value, "city_id");
            return (Criteria) this;
        }

        public Criteria andCity_idGreaterThan(Integer value) {
            addCriterion("t.city_id >", value, "city_id");
            return (Criteria) this;
        }

        public Criteria andCityNameGreaterThan(String value) {
            addCriterion("t.cityName >", value, "cityName");
            return (Criteria) this;
        }

        public Criteria andParentidLessThan(Integer value) {
            addCriterion("t.parentid <", value, "parentid");
            return (Criteria) this;
        }

        public Criteria andCity_idBetween(Integer value1, Integer value2) {
            addCriterion("t.city_id between", value1, value2, "city_id");
            return (Criteria) this;
        }

        public Criteria andCityNameNotEqualTo(String value) {
            addCriterion("t.cityName <>", value, "cityName");
            return (Criteria) this;
        }

        public Criteria andParentidLessThanOrEqualTo(Integer value) {
            addCriterion("t.parentid <=", value, "parentid");
            return (Criteria) this;
        }

        public Criteria andCity_idNotBetween(Integer value1, Integer value2) {
            addCriterion("t.city_id not between", value1, value2, "city_id");
            return (Criteria) this;
        }

        public Criteria andCity_idGreaterThanOrEqualTo(Integer value) {
            addCriterion("t.city_id >=", value, "city_id");
            return (Criteria) this;
        }

        public Criteria andParentidIsNull() {
            addCriterion("t.parentid is null");
            return (Criteria) this;
        }

        public Criteria andParentidNotBetween(Integer value1, Integer value2) {
            addCriterion("t.parentid not between", value1, value2, "parentid");
            return (Criteria) this;
        }

        public Criteria andParentidIsNotNull() {
            addCriterion("t.parentid is not null");
            return (Criteria) this;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public Criteria andCodeidGreaterThan(Integer value) {
            addCriterion("t.codeid >", value, "codeid");
            return (Criteria) this;
        }

        public Criteria andCodeidNotEqualTo(Integer value) {
            addCriterion("t.codeid <>", value, "codeid");
            return (Criteria) this;
        }

        public Criteria andParentidGreaterThan(Integer value) {
            addCriterion("t.parentid >", value, "parentid");
            return (Criteria) this;
        }

        public Criteria andCity_idNotIn(List<Integer> values) {
            addCriterion("t.city_id not in", values, "city_id");
            return (Criteria) this;
        }

        public Criteria andCodeidEqualTo(Integer value) {
            addCriterion("t.codeid =", value, "codeid");
            return (Criteria) this;
        }

        public Criteria andParentidNotEqualTo(Integer value) {
            addCriterion("t.parentid <>", value, "parentid");
            return (Criteria) this;
        }

        public Criteria andCity_idIsNull() {
            addCriterion("t.city_id is null");
            return (Criteria) this;
        }

        public Criteria andCityNameGreaterThanOrEqualTo(String value) {
            addCriterion("t.cityName >=", value, "cityName");
            return (Criteria) this;
        }

        public Criteria andCityNameLike(String value) {
            addCriterion("t.cityName like", value, "cityName");
            return (Criteria) this;
        }

        public Criteria andCityNameLikeInsensitive(String value) {
            addCriterion("upper(t.cityName) like", value.toUpperCase(), "cityName");
            return (Criteria) this;
        }

        public Criteria andCity_idEqualTo(Integer value) {
            addCriterion("t.city_id =", value, "city_id");
            return (Criteria) this;
        }

        public Criteria andCityNameBetween(String value1, String value2) {
            addCriterion("t.cityName between", value1, value2, "cityName");
            return (Criteria) this;
        }

        public Criteria andCodeidNotBetween(Integer value1, Integer value2) {
            addCriterion("t.codeid not between", value1, value2, "codeid");
            return (Criteria) this;
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andCodeidIn(List<Integer> values) {
            addCriterion("t.codeid in", values, "codeid");
            return (Criteria) this;
        }

        public Criteria andCodeidNotIn(List<Integer> values) {
            addCriterion("t.codeid not in", values, "codeid");
            return (Criteria) this;
        }

        public Criteria andParentidNotIn(List<Integer> values) {
            addCriterion("t.parentid not in", values, "parentid");
            return (Criteria) this;
        }

        public Criteria andCityNameEqualTo(String value) {
            addCriterion("t.cityName =", value, "cityName");
            return (Criteria) this;
        }

        public Criteria andCityNameLessThan(String value) {
            addCriterion("t.cityName <", value, "cityName");
            return (Criteria) this;
        }

        public Criteria andParentidBetween(Integer value1, Integer value2) {
            addCriterion("t.parentid between", value1, value2, "parentid");
            return (Criteria) this;
        }

        public Criteria andCodeidLessThanOrEqualTo(Integer value) {
            addCriterion("t.codeid <=", value, "codeid");
            return (Criteria) this;
        }

        public Criteria andParentidGreaterThanOrEqualTo(Integer value) {
            addCriterion("t.parentid >=", value, "parentid");
            return (Criteria) this;
        }

        public Criteria andCity_idLessThanOrEqualTo(Integer value) {
            addCriterion("t.city_id <=", value, "city_id");
            return (Criteria) this;
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public Criteria andCodeidLessThan(Integer value) {
            addCriterion("t.codeid <", value, "codeid");
            return (Criteria) this;
        }

        public Criteria andCityNameLessThanOrEqualTo(String value) {
            addCriterion("t.cityName <=", value, "cityName");
            return (Criteria) this;
        }

        public Criteria andCityNameNotIn(List<String> values) {
            addCriterion("t.cityName not in", values, "cityName");
            return (Criteria) this;
        }

        public Criteria andCodeidIsNull() {
            addCriterion("t.codeid is null");
            return (Criteria) this;
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        public Criteria andCodeidGreaterThanOrEqualTo(Integer value) {
            addCriterion("t.codeid >=", value, "codeid");
            return (Criteria) this;
        }

        public Criteria andCityNameIsNull() {
            addCriterion("t.cityName is null");
            return (Criteria) this;
        }

        public Criteria andCity_idIn(List<Integer> values) {
            addCriterion("t.city_id in", values, "city_id");
            return (Criteria) this;
        }

        public Criteria andCityNameNotLike(String value) {
            addCriterion("t.cityName not like", value, "cityName");
            return (Criteria) this;
        }
    }

    /**
     * @mbg.generated Tue May 28 17:18:18 CST 2019
     */
    public static class Criterion {

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        private String condition;

        private boolean singleValue;

        private boolean noValue;

        private Object secondValue;

        private Object value;

        private String typeHandler;

        private boolean betweenValue;

        private boolean listValue;

        public boolean isSingleValue() {
            return singleValue;
        }

        public String getCondition() {
            return condition;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        public boolean isListValue() {
            return listValue;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public Object getValue() {
            return value;
        }
    }
}
